{template 'common/header'}
<ul class="nav nav-tabs">
	<li class="active"><a href="{php echo $this->createWebUrl('record');}">全部交易记录</a></li>
</ul>
	<div class="panel panel-default">
		<div class="panel-heading">交易记录</div>
		<div class="panel-body">
			<div class="table-responsive panel-body">
				<table class="table table-hover table-bordered" style="min-width: 300px;">
					<thead class="navbar-inner">
						<tr>
							<th class="col-sm-1 text-center">头像</th>
							<th class="col-sm-1 text-center">昵称</th>
							<th class="col-sm-1 text-center">商品图片</th>
							<th class="col-sm-2 text-center">商品名称</th>
							<th class="col-sm-1 text-center">消费夺宝币数量</th>
							<th class="col-sm-1 text-center">状态</th>
							<th class="col-sm-2 text-center">消费时间</th>
							<!--<th class="col-sm-1 text-center">操作</th>-->
						</tr>
					</thead>
					<tbody>
						{loop $goodses $goodsid $goods}
						<tr>
							<td class="text-center"><img src="{php echo tomedia($goods['avatar'])}" style="width: 40px; height: 40px;padding:1px;border: 1px dotted gray;"></td>
							<td class="text-center">{if strpos($goods['openid'],'machine') == 'true'}<span style="color: red;">(机器人)</span>{/if}{$goods['nickname']}</td>
							<td class="text-center"><img src="{php echo tomedia($goods['picarr'])}" style="width: 40px; height: 40px;padding:1px;border: 1px dotted gray;"></td>
							<td class="text-center">第（{$goods['periods']}）期  &nbsp;{$goods['title']}</td>
							<td class="text-center">{$goods['num']} 个</td>
							<td class="text-center">{if $goods['status']==1}<span class="label label-success">消费成功</span>{else}<span class="label label-default">消费失败</span>{/if}</td>
							<td class="text-center">{php echo date('Y-m-d H:i:s', $goods['createtime'])}</td>
							<!--<td class="text-center">
								<a href="{php echo $this->createWebUrl('showrecords', array('id'=>$goods['id']));}" class="btn btn-success btn-sm" data-original-title="" title="">查看兑换码</a>
							</td>-->
						</tr>
						{/loop}
						{if empty($goodses)}
						<tr>
							<td colspan="8">
								没有交易记录
							</td>
						</tr>
						{/if}
					</tbody>
				</table>
			</div>
		</div>
	</div>
	{$pager}
</div>

{template 'common/footer'}